#ifndef MUSICPLAYER_H
#define MUSICPLAYER_H

#include <QWidget>
#include<QMouseEvent>
#include<QDebug>
#include<QGraphicsDropShadowEffect>
#include<QJsonArray>
#include<QJsonObject>
#include "volumetool.h"


QT_BEGIN_NAMESPACE
namespace Ui {
class MusicPlayer;
}
QT_END_NAMESPACE

class MusicPlayer : public QWidget
{
    Q_OBJECT

public:
    MusicPlayer(QWidget *parent = nullptr);
    ~MusicPlayer();

    QJsonArray randomPiction();

protected:
    //支持窗口移动
    void mouseMoveEvent(QMouseEvent *event);
    void mousePressEvent(QMouseEvent *event);

    void initUi();

    void connectSignalAndSlots();
    //void test();

private slots:
    void on_quit_clicked();
    void onBtFormClick(int pageId);

    void on_volume_clicked();

private:
    Ui::MusicPlayer *ui;
    QPoint  dragPos;//获取鼠标坐标

    VolumeTool* volumeTool;//音量控制区

    bool isDrag;
};
#endif // MUSICPLAYER_H
